<template>
  <div class="goods-list-item">
    <img :src="goodsItem.show.img" alt="">
    <div class="item-title">
      <span>{{goodsItem.title}}</span>
    </div>
    <div class="item-info">
      <span class="price">￥{{goodsItem.price}}</span>
      <span class="collect">收藏数:{{goodsItem.cfav}}</span>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      goodsItem: {
        type: Object,
        default() {
          return {}
        }
      }
    }

  }
</script>

<style>
.goods-list-item {
  display: inline-block;
  width: 50%;
  height: 270px;
  overflow: hidden;
  box-sizing: border-box;
  padding: 5px;
}
.goods-list-item img {
  width: 100%;
  border-radius: 5px;
}
.goods-list-item div {
  font-size: 0.5em;
}
.item-title {
  height: 25px;
  line-height: 25px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.item-info {
  display: flex;
  justify-content: space-between;
}
.item-info .price {
  color: red;
}
</style>